<div class="bjui-pageContent">
    <form action="{:U('save_brand')}" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="dialogForm">
        <input type="hidden" name="id" value="{$va.id}"/>
        <div class="form-group">
            <label class="x100">品牌名称:</label>
            <input type="text" name="name" value="{$va.name}" data-rule="required" />
        </div>
        <div class="form-group">
            <label class="x100">品牌网址:</label>
            <input type="text" name="url" value="{$va.url}" data-rule="required;url" />
        </div>
        <div class="form-group">
            <label class="x100">所属分类:</label>
             <select name="category_ids[]" data-toggle="selectpicker" multiple data-width="400">
                   <option value="">--请选择--</option>
                   <volist name="res" id="vo">
                     <option value="{$vo.id}" <if condition="in_array($vo['id'],$va['category_ids'])">selected</if>>{$vo.name}</option>
                   </volist>
             </select>
        </div>
        <div class="form-group clearfix">
            <label class="x100 pull-left">品牌logo:</label>
            <div class="pull-left parent_img">
                <if condition="$va.logo eq null">
                <img src="__PU__/images/1584936.jpg" alt="LOGO" width="70" />
                <else/>
                <img src="{$va.logo}" alt="LOGO" width="70" />
                </if>
                <input type="hidden" name="logo" value="{$va.logo}"/>
                <span data-toggle="upload" 
                data-uploader="{:U('Index/upload')}"
                 data-file-type-exts="*.png;*.jpg"
                 data-icon="cloud-upload"
                 data-on-upload-success="upload_callback"
                 data-auto="true"
                 data-button-text="上传图片"
                ></span>
            </div>
        </div>
        <div class="form-group">
            <label class="x100">权重:</label>
            <input type="text" name="sort" value="{$va.sort}" data-toggle="spinner" data-min="0" data-step="1" data-rule="integer" class="w100"  />
        </div>
        <div class="form-group">
            <label class="x100">状态:</label>
             <input type="radio" name="status" value="0" id="brand_status1" data-toggle="icheck" data-label="显示"  <if condition="$va.sort neq '1'">checked</if>  />
              <input type="radio" name="status" value="1" id="brand_status2" data-toggle="icheck" data-label="不显示" <if condition="$va.sort eq '1'">checked</if>  />
        </div>
    </form>
</div>
<include file="Common/footer" ftype="save" />